#! /usr/bin/perl -w
use strict;
use warnings;


fizzbuzz_main( \@ARGV );


sub fizzbuzz_main{
	my ( $p_hikisu ) = @_;
	my ( $start, $end ) = hikisu_check( @$p_hikisu );
	foreach( $start..$end ){
		print_fizzbuzz( $_ );
	}
}

sub tekiseichi_ireru{
	my ( $value, $default ) = @_;
	if(   !defined $value
	   || $value !~ /^\d+$/ )
	{
		$value = $default;
	}
	return $value;
}

sub hikisu_check{
	my ( $start, $end ) = @_;

	$start = tekiseichi_ireru( $start,   1 );
	$end   = tekiseichi_ireru( $end  , 100 );
	if( $start > $end ){
		my $temp = $end;
		$end = $start;
		$start = $temp;
		undef $temp;
	}
	return ( $start, $end );

}

sub print_fizzbuzz{
	my ( $number ) = @_;
	my $flag = 0;
	$flag = print 'FIZZ' if( $number % 3 == 0 );
	$flag = print 'BUZZ' if( $number % 5 == 0 );
	print $number if( !$flag );
	print "\n";
}



1;
